﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RequiredExample.aspx.cs" Inherits="Examples_Validations_RequiredExample" %>
<%@ Register TagPrefix="mobile"
    Namespace="System.Web.UI.MobileControls"
    Assembly="System.Web.Mobile"  %>
 <mobile:Form id="Form1" runat="server">
    <mobile:Label id="Label1" runat="server">
        Your name:
    </mobile:Label>
    <mobile:TextBox id="userName" runat="server"/>
    <mobile:RequiredFieldValidator id="RequiredFieldValidator1"
        runat="server"
        Display="Dynamic"
        ErrorMessage="Your name is required! "
        ControlToValidate="userName"/>
    <mobile:Command id="Command1" OnClick="Command1_Click" runat="server">
        Submit
    </mobile:Command>
</mobile:Form>
   
<mobile:Form id="Form2" runat="server">
    <mobile:Label id="Label2" runat="server">
        Input validated OK.
    </mobile:Label>
</mobile:Form>